////////////////////////////////////////////////////////////////////////////////
///////// Inflexibility and Corporate Credit Spreads ///////////////////////////
///////// Zhe An, Abe de Jong, Ying Xia, Zhaofeng Xu ///////////////////////////
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
* Date: May 5, 2025
* This do file contains code generating results for Tables 3 
* Please define the path for datasets and the path for storing results before running the following program. 
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////

********************************************************************************
* Table 3 RDD on Ex-post Inflexibility and Credit Spreads
********************************************************************************

* Use the RDD sample 
* [RDD_sample]

use "Path\RDD_sample.dta", clear

* Panel A - Table 3
rdbwselect  future2_inflex  m_vote_rate_decimal , c(0.5) p(3)  
rdrobust future2_inflex m_vote_rate_decimal, c(0.5) p(3) 

* Panel B - Table 3
rdbwselect  future2_yield m_vote_rate_decimal , c(0.5) p(3) 
rdrobust future2_yield m_vote_rate_decimal , c(0.5) p(3)  

* Panel C - Table 3
* For predicted value 
rdbwselect  predicted  m_vote_rate_decimal , c(0.5) p(3)  
rdrobust predicted  m_vote_rate_decimal , c(0.5) p(3)  

* For residual value 
rdbwselect  residual  m_vote_rate_decimal , c(0.5) p(3)   
rdrobust residual m_vote_rate_decimal , c(0.5) p(3) 

********************************************************************************

////////////////////////////////////////////////////////////////////////////////
* The above codes generate the result, and the format of table is finalised in Excel. 

////////////////////////////////////////////////////////////////////////////////

